<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">

	<head>
	
		<!-- Basic -->
    	<meta charset="UTF-8" />

		<title>用户登录</title>
		
		<!-- Mobile Metas -->
	    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		
		<!-- Import google fonts -->
        <link href="http://fonts.useso.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css" />
		<!-- 加载common css -->
		<jsp:include page="include/loadCSS.jsp"></jsp:include>
		
		<!-- Plugins CSS-->		
		
		<!-- Theme CSS -->
		<link href="<%=path %>/assets/css/jquery.mmenu.css" rel="stylesheet" />
		
		<!-- Page CSS -->		
		<link href="<%=path %>/assets/css/style.css" rel="stylesheet" />
		<link href="<%=path %>/assets/css/add-ons.min.css" rel="stylesheet" />
		
		<style>
			footer {
				display: none;
			}
		</style>
		
		<!-- end: CSS file-->	
	    
		
		<!-- Head Libs -->
		<script src="<%=path %>/assets/plugins/modernizr/js/modernizr.js"></script>
		
		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
			<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
		<![endif]-->
		<!-- 登录验证 -->		
		<script type="text/javascript">
		function login() {
			  // console.info("点击了登录");
			  var userName = $("#uName").val();
			  // console.info(userName)
			  var userPass = $("#uPwd").val();
			  // console.info(userPass);
			  if (userName == "" || userName == null) {
			    alert("用户名不能为空");
			    return false;
			  } else if (userPass == "" || userPass == null) {
			    alert("密码不能为空");
			    return false;
			  } else {
			    return true;
			  }
			}
		</script>
	</head>

	<body>
		<!-- Start: Content -->
		<div class="container-fluid content">
			<div class="row">
				<!-- Main Page -->
				<div class="body-login">
					<div class="center-login">
						<a href="#" class="logo pull-left hidden-xs">
							<img src="<%=path %>/assets/img/logo1.png" height="45" alt="Money Bag" />
						</a>

						<div class="panel panel-login">
							<div class="panel-title-login text-right">
								<h2 class="title"><i class="fa fa-user"></i>登录</h2>
							</div>
							<div class="panel-body">
								<form action="<%=path %>/user/login" method="post" onsubmit="return login();">
									<div class="form-group">
										<label>帐号</label>
										<div class="input-group input-group-icon">
											<input name="username" type="text" id="uName" class="form-control bk-noradius" />
											<span class="input-group-addon">
												<span class="icon">
													<i class="fa fa-user"></i>
												</span>
											</span>
										</div>
									</div>

									<div class="form-group">
										<label>密码</label>									
										<div class="input-group input-group-icon">
											<input name="password" type="password" id="uPwd" class="form-control bk-noradius" />
											<span class="input-group-addon">
												<span class="icon">
													<i class="fa fa-lock"></i>
												</span>
											</span>
										</div>
									</div>
									<br />
									<span style="color:red">${requestScope.error}</span>
									<div class="row">
										<div class="col-sm-8">
											<div class="checkbox-custom checkbox-default bk-margin-bottom-10">
												<input id="RememberMe" name="rememberme" type="checkbox"/>
												<label for="RememberMe">Remember Me</label>
											</div>
										</div>
										<div class="col-sm-4 text-right">
											<button href="index.html" type="submit" class="btn btn-primary hidden-xs">Login</button>
											<button href="index.html" type="submit" class="btn btn-primary btn-block btn-lg visible-xs bk-margin-top-10">Login</button>
										</div>
									</div>
									<br />
									<div class="text-with-hr">
										<span>or</span>
									</div>
									<p class="text-center">Don't have an account yet? <a href="<%=path %>/user/register"><small>Register!</small></a>
								</form>
							</div>
						</div>
					</div>
				</div>
				<!-- End Main Page -->				
		
			</div>
		</div><!--/container-->
		
		
		<!-- start: JavaScript-->
		
		<!-- 加载 common js -->
		<jsp:include page="include/loadJS.jsp"></jsp:include>		
		
		<!-- Pages JS -->
		<script src="<%=path %>/assets/js/pages/page-login.js"></script>
		
		<!-- end: JavaScript-->
		
	</body>
	
</html>